package com.probox.common.entity.domain.order;

import java.util.Date;
import java.io.Serializable;

import com.alibaba.fastjson.JSONArray;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.probox.common.core.annotation.Excel;

/**
 * 订单发货信息对象 order_ship_deliver
 *
 * @author hds
 * @date 2021-06-07
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("order_ship_deliver")
@ApiModel(description="订单发货信息")
public class OrderShipDeliver implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    //默认主键自增
    @TableId(value = "DELIVER_UID", type = IdType.AUTO)
    private Long deliverUid;
    /** 平台ID */
    @Excel(name = "平台ID")
    @ApiModelProperty(value = "平台ID(平台ID)")
    private Long platformUid;

    /** 订单ID */
    @Excel(name = "订单ID")
    @ApiModelProperty(value = "订单ID(订单ID)")
    private Long orderUid;

    /** 订单编号 */
    @Excel(name = "订单编号")
    @ApiModelProperty(value = "订单编号(订单编号)")
    private String orderNo;

    /** 发货类型 0 正常/1补发/2换货 */
    @Excel(name = "发货类型 0 正常/1补发/2换货")
    @ApiModelProperty(value = "发货类型 0 正常/1补发/2换货(发货类型 0 正常/1补发/2换货)")
    private String deliverType;

    /** 客户ID */
    @Excel(name = "客户ID")
    @ApiModelProperty(value = "客户ID(客户ID)")
    private Long customerUid;

    /** 客户名称 */
    @Excel(name = "客户名称")
    @ApiModelProperty(value = "客户名称(客户名称)")
    private String customerName;

    /** 配送费用(物流费用) */
    @Excel(name = "配送费用(物流费用)")
    @ApiModelProperty(value = "配送费用(物流费用)(配送费用(物流费用))")
    private String deliverAmount;

    /** 配送方式 express快递、ziti自提、logistics物流 */
    @Excel(name = "配送方式 express快递、ziti自提、logistics物流")
    @ApiModelProperty(value = "配送方式 express快递、ziti自提、logistics物流(配送方式 express快递、ziti自提、logistics物流)")
    private String deliverMethod;

    /** 快递公司 */
    @Excel(name = "快递公司")
    @ApiModelProperty(value = "快递公司(快递公司)")
    private String expressCompany;

    /** 快递公司编码 */
    @Excel(name = "快递公司编码")
    @ApiModelProperty(value = "快递公司编码(快递公司编码)")
    private String expressCode;

    /** 快递单号 */
    @Excel(name = "快递单号")
    @ApiModelProperty(value = "快递单号(快递单号)")
    private String expressNo;

    /** 包裹状态 0待揽收/1运输中/2已妥投 */
    @Excel(name = "包裹状态 0待揽收/1运输中/2已妥投")
    @ApiModelProperty(value = "包裹状态 0待揽收/1运输中/2已妥投(包裹状态 0待揽收/1运输中/2已妥投)")
    private String packStatus;

    /** 包裹流转信息 */
    @Excel(name = "包裹流转信息")
    @ApiModelProperty(value = "包裹流转信息(包裹流转信息)")
    private String content;

    /** 用户地址表ID */
    @Excel(name = "用户地址表ID")
    @ApiModelProperty(value = "用户地址表ID(用户地址表ID)")
    private Long addressUid;

    /** 省份代码 */
    @Excel(name = "省份代码")
    @ApiModelProperty(value = "省份代码(省份代码)")
    private String province;

    /** 城市代码 */
    @Excel(name = "城市代码")
    @ApiModelProperty(value = "城市代码(城市代码)")
    private String city;

    /** 区县代码 */
    @Excel(name = "区县代码")
    @ApiModelProperty(value = "区县代码(区县代码)")
    private String county;

    /** 乡镇代码 */
    @Excel(name = "乡镇代码")
    @ApiModelProperty(value = "乡镇代码(乡镇代码)")
    private String town;

    /** 详细地址 */
    @Excel(name = "详细地址")
    @ApiModelProperty(value = "详细地址(详细地址)")
    private String addressDetail;

    /** 收货人 */
    @Excel(name = "收货人")
    @ApiModelProperty(value = "收货人(收货人)")
    private String consigneeName;

    /** 手机 */
    @Excel(name = "手机")
    @ApiModelProperty(value = "手机(手机)")
    private String mobileNum;

    /** 邮编 */
    @Excel(name = "邮编")
    @ApiModelProperty(value = "邮编(邮编)")
    private String zipCode;

    private String dataStatus;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间" , width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @TableField(exist = false)
    private Long storeId;


    /**
     * 物流轨迹格式化
     * @return
     */
    public JSONArray getContentArray(){
        return JSONArray.parseArray(content);
    }

}
